const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
  /**
   * This is the main entry point for your application, it's the first file
   * that runs in the main process.
   */
  entry: './src/main.js',
  // Put your normal webpack config below here
  module: {
    rules: require('./webpack.rules'),
  },
  // externals: {
  //   'pdf-to-printer': 'commonjs pdf-to-printer', // 指定外部库
  // },
  plugins: [
    new CopyWebpackPlugin({
      patterns: [
        { from: 'node_modules/pdf-to-printer/dist/SumatraPDF-3.4.6-32.exe', to: 'SumatraPDF-3.4.6-32.exe' },
      ],
    }),
  ],
};
